#include <stdio.h>
#include <string.h>

void my_lea(char* arr, int k)
{
	int len = strlen(arr);
	int time = k % len;

	for (int i = 0; i < time; i++)
	{
		int tem = arr[0];
		int j = 0;
		for (; j < len-1; j++)
		{
            arr[j] = arr[j + 1];
		}
		arr[len-1] = tem;
	}
	printf("%s\n", arr);
}


int main()
{
	char arr[] = "abcdefg";
	int k = 0;
	scanf_s("%d", &k);
	my_lea(arr, k);
	return 0;
}